package it.polimi.jita.cp.block.dd;

import java.util.HashMap;
import java.util.Map;

public class ServiceLevel {
	private Map<ServiceLevelType, Double> sls = new HashMap<>();
	
	

	public boolean containsSl(ServiceLevelType slType) {
		return sls.containsKey(slType);
	}

	public Double get(ServiceLevelType key) {
		return sls.get(key);
	}

	protected Double put(ServiceLevelType arg0, Double arg1) {
		if (arg1 < 0 || arg1 > 1)
			throw new RuntimeException(
					"Service level value must be inside interval 0 <= x <= 1. x="+arg1);
		return sls.put(arg0, arg1);
	}

	public static enum ServiceLevelType {
		RT, T;
	}
}
